package com.example.quickthumb;

import com.quickthumb.game.Screen;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.Log;
import android.view.DragEvent;
import android.view.MotionEvent;
import android.view.SurfaceView;
import android.view.View;

public class GameView extends View {
	private Paint p = new Paint();
	private Screen s;

	public GameView(Context context) {
		super(context);
		setFocusable(true);
		s = new Screen();
		s.init();

	}

	@Override
	protected void onDraw(Canvas c) {
		s.draw(c, p);
		try {
			Thread.sleep(1000 / 30);
		} catch (InterruptedException e) {
		}
		invalidate();
	}

	@Override
	public boolean onTouchEvent(MotionEvent e) {
		Screen.touch(e);
		return super.onTouchEvent(e);
	}	
}